﻿using Cl.Model.Results;
using Cl.Service.SignalR.Sservice;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cl.Service.SignalR
{
    public class GlobalSignalrProvider
    {
        private static ISignalrService SignalrService;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="globalHubContext"></param>
        public static void Configure(ISignalrService signalrService)
        {

            SignalrService = signalrService;
        }


        /// <summary>
        /// 通知刷新统计信息
        /// </summary>
        public static void NotifyRefreshChartInfo()
        {
            SignalrService.NotifyRefreshChartInfo();
        }

        #region 公用方法

        public static void NotifyTest()
        {
            SignalrService.NotifyTest();
        }

        public static ResultInfoModel GetAllConnSignalrList()
        {
            var obj = SignalrService.GetAllConnSignalrList();
            return GetResult.Success("", obj);
        }

        #endregion
    }
}
